package com.qyer.lxp.model.product.parameter;

import com.qyer.lxp.common.framework.adapter.DateAdapter;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.io.Serializable;
import java.util.Date;

/**
 * 获取产品code以及更新时间接口传参model类
 * Created by jiangping on 16/5/13.
 */
@XmlRootElement(name = "product-code-search-request")
@XmlAccessorType(XmlAccessType.FIELD)
public class ProductCodeSearchRequest implements Serializable {
    private static final long serialVersionUID = 1780697030593715103L;

    /**
     * 最后更新时间起 格式（2014-09-01）
     */
    @XmlJavaTypeAdapter(value = DateAdapter.class)
    @XmlElement(name = "update-date-start")
    private Date updateDateStart;

    /**
     * 最后更新时间止 格式（2014-09-01）默认为当前时间，建议不填
     */
    @XmlJavaTypeAdapter(value = DateAdapter.class)
    @XmlElement(name = "update-date-end")
    private Date updateDateEnd;

    /**
     * 返回结果起始数，最小为1
     */
    private int start;

    /**
     * 返回结果结束数
     */
    private int end;

    public Date getUpdateDateStart() {
        return updateDateStart;
    }

    public void setUpdateDateStart(Date updateDateStart) {
        this.updateDateStart = updateDateStart;
    }

    public Date getUpdateDateEnd() {
        return updateDateEnd;
    }

    public void setUpdateDateEnd(Date updateDateEnd) {
        this.updateDateEnd = updateDateEnd;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    @Override
    public String toString() {
        return "ProductCodeSearchRequest{" +
                "updateDateStart=" + updateDateStart +
                ", updateDateEnd=" + updateDateEnd +
                ", start=" + start +
                ", end=" + end +
                '}';
    }
}
